1. Field of the Invention
The present invention relates to motion image encoding and decoding methods and apparatuses, and more particularly, to a method of adaptively encoding and decoding motion images in accordance with a temporal complexity of an input image, and an apparatus therefor.
2. Description of the Related Art
With recent popularity of digital image recorders (DVR) or personal image recorders (PVR), researches and developments on image encoding are actively conducted. Existing DVRs or PVRs compress images at a fixed frame rate without considering a characteristic of an input image, that is, a temporal complexity of the input image, thus degrading an encoding efficiency of the input image.
FIG. 1 is a block diagram of a conventional motion image encoder. First of all, input image data of an input (motion) image is broken down into 8 8 pixel blocks. A discrete cosine transform (DCT) unit 110 performs DCT on an 8 8 pixel block of the input image data at a time in order to remove a spatial redundancy of the input image data. A quantization (Q) unit 120 quantizes DCT coefficients obtained by the DCT unit 120 and expresses the DCT coefficients in some representative values, thus achieving highly efficient loss-encoding. A variable length coding (VLC) unit 130 performs VLC on the quantized DCT coefficients and outputs an entropy-encoded data stream.
An inverse quantization (IQ) unit 140 inversely quantizes the quantized DCT coefficients obtained by the Q unit 120. An inverse DCT (IDCT) unit 150 performs IDCT on dequantized DCT coefficients obtained by the IQ unit 140. A frame memory 160 stores the IDCT-transformed image data obtained by the IDCT unit 150 on a frame-by-frame basis. A motion estimation (ME) unit 170 is used to remove a temporal redundancy from the IDCT-transformed image data using a currently received frame of the input image data and a previous frame of the input image data stored in the frame memory 160.
In order to perform data encoding, conventional DVRs or PVRs use an MPEG-2 encoder as shown in FIG. 1. If the input image data has not been encoded, the input image data is encoded by the MPEG-2 encoder to a bitstream, and the bitstream is stored in a storage medium, such as a hard disk drive (HDD) or a digital versatile disc (DVD). If the input image data has been encoded, a conventional motion image transcoder of FIG. 2 performs MPEG-2 decoding on the input image data to produce a desired MPEG-2 stream, performs predetermined scaling and format conversion on the produced MPEG-2 stream, and then performs MPEG-2 encoding on the resultant data.
Referring to FIG. 2, if the input image data of an input (motion) image is an encoded bitstream, the input image data is decoded by a motion image decoder 220 including a variable length decoding (VLD) unit 222, an IQ unit 224, an IDCT unit 226, a frame memory 228, and a motion compensation (MC) unit 230. Thereafter, the decoded bitstream is encoded with a given resolution by an MPEG-2 encoder 260 same as the motion image encoder of FIG. 1 in order to produce a desired MPEG-2 stream. Such a process is referred to as transcoding. Upon the transcoding, a scaling & format-conversion unit 240, as needed, down-scales the input image decoded by the motion image decoder 220 or converts a scan format of the decoded input image, and the MPEG-2 encoder 260 performs MPEG-2 encoding at a given frame rate.
As described above, in the prior art, the MPEG-2 encoding is always performed at a fixed frame rate. Accordingly, no matter whether the temporal complexity is high or low depending on characteristics of the input image, the encoding is performed at the same frame rate. Particularly, even when an incoming motion image hardly changes with time, the same frame rate must be maintained. This degrades an encoding efficiency.